import * as THREE from 'three'

const arr = [
    new THREE.Vector2(0, 0),
    new THREE.Vector2(30, 60),
    new THREE.Vector2(0, 120)
]

const geometry = new THREE.LatheGeometry(arr, 100)

const material = new THREE.MeshLambertMaterial({
    color: new THREE.Color('pink'),
    side: THREE.DoubleSide,
})

const mesh = new THREE.Mesh(geometry, material)

const geometry2 = new THREE.BufferGeometry()
geometry2.setFromPoints(arr)
const material2 = new THREE.PointsMaterial({
    color: new THREE.Color('blue'),
    size: 10,
})
const points2 = new THREE.Points(geometry2, material2)
const line2 = new THREE.Line(geometry2, new THREE.LineBasicMaterial())
mesh.add(points2, line2)

export default mesh